const getServerSideProps = async (context) => { const res = await fetch('http://localhost:3000/api' + context.resolvedUrl); const data = await res.json(); return { props: { data } }; } const PageSubstance = (props) => { const data = props.data switch (data.resultType) { case 'treeContents': return (
Binary content cannot be displayed.